<template>
  <yy-paging v-model="dataList" @query="queryList" ref="paging" :auto="automatic" @scroll="scroll" :refresher-enabled="false">
    <template #top>
      <u-navbar
        back-text=""
        :is-back="true"
        title="设置"
        :background="{ backgroundColor: isScroll ? '#FFFFFF' : 'transparent' }"
        :border-bottom="false"
        :custom-style="{ transition: 'background-color 0.3s ease-in-out' }"
      >
      </u-navbar>
    </template>
    <view class="flex flex-col gap-3 p-4">
      <!--  -->
      <view class="rounded-[8px] bg-white">
        <view class="flex justify-between px-5 py-3" @click="vk.navigateTo('/pages/my/changeBinding')">
          <view class="text-[14px] text-[#161A24]">换绑手机 </view>
          <view> <u-icon name="arrow-right" size="26" color="#606368"></u-icon> </view>
        </view>
        <view class="flex justify-between px-5 py-3" @click="vk.navigateTo('/pages/my/logOff')">
          <view class="text-[14px] text-[#161A24]">注销帐号 </view>
          <view> <u-icon name="arrow-right" size="26" color="#606368"></u-icon> </view>
        </view>
      </view>
    </view>
  </yy-paging>
</template>

<script>
  export default {
    data() {
      return {
        isScroll: false,
        dataList: [],
        automatic: false
      }
    },

    methods: {
      scroll(e) {
        this.isScroll = e.detail.scrollTop > 0
      },
      async queryList(page, limit) {
        this.$refs.paging.complete([1, 1, 1])
      }
    }
  }
</script>

<style lang="scss" scoped></style>
